package com.hlk.hlk_blog.dao;

import com.hlk.hlk_blog.entity.User;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    //根据id获取user
    User findUserById(Long id);

    //根据username获取user用来判断用户名是否已存在
    String getUserName(@Param("username") String username);

    //登录
    User login(@Param("username") String username, @Param("password") String password);

    //添加用户
    boolean insertUser(User user);
    /*修改用户*/
    int updateUser(User user);

}